home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d7 / finput.arc / STRFMT.PAS < prev    next >
Pascal/Delphi Source File  |  1991-01-01  |  1KB  |  73 lines

  1. unit StrFmt;
  2. interface
  3.  
  4. function SLongInt (L: longint)                          :string;
  5. function SFLongInt(L: longint; Siz: integer)            :string;
  6. function SReal    (R: real)                             :string;
  7. function SFReal   (R: real; Siz: integer)               :string;
  8. function SFDReal  (R: real; Siz: integer; Dec: integer) :string;
  9.  
  10. implementation
  11.  
  12. function SLongInt;
  13. var
  14.   RStr : ^string;
  15. begin
  16.   asm
  17.     mov  sp,bp
  18.     push ss
  19.     push word ptr [bp+0ah]
  20.   end;
  21.   str(L, RStr^);
  22. end;
  23.  
  24. function SFLongInt;
  25. var
  26.   RStr : ^string;
  27. begin
  28.   asm
  29.     mov  sp,bp
  30.     push ss
  31.     push word ptr [bp+0ch]
  32.   end;
  33.   str(L:Siz, RStr^);
  34. end;
  35.  
  36. function SReal;
  37. var
  38.   RStr : ^string;
  39. begin
  40.   asm
  41.     mov  sp,bp
  42.     push ss
  43.     push word ptr [bp+0ch]
  44.   end;
  45.   str(R, RStr^);
  46. end;
  47.  
  48. function SFReal;
  49. var
  50.   RStr : ^string;
  51. begin
  52.   asm
  53.     mov  sp,bp
  54.     push ss
  55.     push word ptr [bp+0eh]
  56.   end;
  57.   str(R:Siz, RStr^);
  58. end;
  59.  
  60. function SFDReal;
  61. var
  62.   RStr : ^string;
  63. begin
  64.   asm
  65.     mov  sp,bp
  66.     push ss
  67.     push word ptr [bp+10h]
  68.   end;
  69.   str(R:Siz:Dec, RStr^);
  70. end;
  71.  
  72. end.
  73.